<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>个人简历</title>
<style>
body{
    background-image:url(../作业/images/背景图片.jpg);
    background-position:center;
    background-repeat:repeat-x;
    background-size: 100% 100%;
    background-attachment: fixed; /* 背景图片固定 */
    min-height: 100vh;
}
table {
        width: 800px;
        margin: 0 auto;
        background-image:url(../作业/images/bjjjw.jpeg);
        background-position:center;
        background-repeat:repeat-x;
        background-size: 100% 100%;
        background-attachment: fixed; /* 背景图片固定 */
        min-height: 100vh;
        }
th, td {
        padding: 20px;
        text-align: left;
        border:1px solid rgb(0, 0, 0);
        padding: 50px;
        margin:50px;
        }
textarea {
            width: 100%;
            height: 150px;
            margin-top: 20px;
        } 
.anniu {
            width: fit-content; 
            margin: 0 auto;
            text-align: center; 
            
        }
.anniu button {
            margin: 10px;
            cursor: pointer;
            padding: 10px 20px;
        }
</style>
</head>
<body>
<h1 align="center"><font size="10">个人简介</font></h1>
<form action="#" method="post"></form>
<table style="font-size: 16px;">
    <tr>
        <th>姓名</th>
        <td>贾静文</td>       
    </tr>
    <tr>
        <th>头像</th>
        <td><img src="" alt="个人头像" class="photo"></td>
    </tr>
    <tr>
        <th>年龄</th>
        <td>18</td>
    </tr>
    <tr>
        <th for="optionalInput">性别</th>
        <td>
        <input type="radio" name="sex" />男&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" checked="checked" />女
        </td>
    </tr>
    <tr>
        <th>个人简历</th>
        <td><ul>
            <li>来自：山东临沂</li>
            <li>学历：大专</li>
            <li>就读学校：威海职业学院</li>
            <li>工作经验：在学校机房工作两个月之久</li>
            <li>学习经验：熟知HTML+CSS,python等专业知识</li>
            <li>爱好：漫画，书籍，羽毛球</li>
        </ul></td>
    </tr>
    <tr>
        <th>必填文本框</th>
        <td><input type="text" id="requiredInput" placeholder="必填"></td>
    </tr>
</table>
<div class="anniu">
    <button type="button" id="tijiao">提交</button>
    <button type="button" id="chongzhi">重置</button>
</div>
<script type="text/javascript">
    alert('欢迎来到我的简历');
    prompt('请输入姓名','例如张三');
    tijiao.addEventListener('click', function() {
                const inputValue = requiredInput.value.trim();
                if (inputValue.length < 8) {alert('至少8个字符');} 
                else {alert('提交成功');}
            });
            document.getElementById('chongzhi').addEventListener('click', function() {
                requiredInput.value = '必填';
                requiredInput.style.color = '#ccc';
                document.getElementById('optionalInput').type = '';
            });
</script>
</body>
</html>
